PopupMenu
(SESL variant) Static library support version of the framework's android.widget.PopupMenu. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.
Constructors
Link copied to clipboard
Constructor to create a new popup menu with an anchor view.
Constructor to create a new popup menu with an anchor view and alignment gravity.
constructor(@NonNull context: @NonNull Context, @NonNull anchor: @NonNull View, gravity: Int, @AttrRes popupStyleAttr: Int, @StyleRes popupStyleRes: Int)
Constructor a create a new popup menu with a specific style.
Types
Link copied to clipboard
interface OnDismissListener
Callback interface used to notify the application that the menu has closed.
Link copied to clipboard
interface OnMenuItemClickListener
Interface responsible for receiving menu item click events if the items themselves do not have individual item click listeners.
Functions
Link copied to clipboard
Returns an View.OnTouchListener that can be added to the anchor view to implement drag-to-open behavior.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets a custom offset for the popup.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets whether the popup menu's adapter is forced to show icons in the menu item views.
Link copied to clipboard
Sets the gravity used to align the popup window to its anchor view.
Link copied to clipboard
Sets a listener that will be notified when this menu is dismissed.
Link copied to clipboard
open fun setOnMenuItemClickListener(@Nullable listener: @Nullable PopupMenu.OnMenuItemClickListener)
Sets a listener that will be notified when the user selects an item from the menu.